<div class="containFt main history-orders" v-if="show">
	<div class="nav row">
		<div class="col">
			<a :class="{'selected':isToday}" v-on:click="switchTab(1)">今天</a>
		</div>
		<div class="col">
			<a :class="{'selected':!isToday}" v-on:click="switchTab(0)">历史</a>
		</div>
	</div>

	<div v-show="isToday">
		<table class="order-list" id="today-list">
			<thead>
				<tr>
					<th>商品</th>
					<th>平仓价格</th>
					<th>手数</th>
					<th>手续费</th>
					<th>方向</th>
					<th>本单盈亏</th>
					<th>&nbsp;</th>
				</tr>
			</thead>
			<tr v-for="order in ordersToday" v-on:click="showDetail(order.opensn,order)">
				<td>{{order.goodsname}}</td>
				<td>{{order.closeprice|priceFormat(order.mindecimal)}}</td>
				<td>{{order.openamount}}</td>
				<td>{{order.opencharge|priceFormat(2)}}</td>
				<td>{{order.direction|lowHigh}}</td>
				<td class="user-nav-list" :class="'cl-'+(order.pl*100 + order.clearpl*100 >= 0?'up':'down')">{{((order.pl*100 + order.clearpl*100) / 100)|priceFormat(2)}}</td>
			</tr>
		</table>
	</div>

	<div v-show="!isToday">
		<div class="search row">
			<div class="time">
				<input type="date" v-model="startTime" id="startdate" name="startdate">
				<!--  span>至</span>
		        <input type="date" value="2016-07-31" id="enddate" name="enddate">-->
			</div>
			<div @click="query()" class="common-btn">查询</div>
		</div>
		<table class="order-list" id="history-list">
			<thead>
				<tr>
					<th>商品</th>
					<th>平仓价格</th>
					<th>手数</th>
					<th>手续费</th>
					<th>方向</th>
					<th>本单盈亏</th>
					<th>&nbsp;</th>
				</tr>
			</thead>
			<tr v-for="order in ordersHistory" v-on:click="showDetail(order.opensn,order)">
				<td>{{order.goodsname}}</td>
				<td>{{order.closeprice|priceFormat(order.mindecimal)}}</td>
				<td>{{order.openamount}}</td>
				<td>{{order.opencharge|priceFormat(2)}}</td>
				<td>{{order.direction|lowHigh}}</td>
				<td class="user-nav-list" :class="'cl-'+(order.pl*100 + order.clearpl*100 >= 0?'up':'down')">{{((order.pl*100 + order.clearpl*100) / 100).toFixed(2)}}</td>
			</tr>
		</table>
		<input type="button" value="查看更多" @click="query(1)" v-show="showMore.history" />
	</div>

	<div class="loadingCt" id="loading" v-show="loading"></div>

</div>
<!-- main -->